package cn.edu.sgu.www.mhxysy.service.impl;

import cn.edu.sgu.www.mhxysy.entity.Area;
import cn.edu.sgu.www.mhxysy.mapper.AreaMapper;
import cn.edu.sgu.www.mhxysy.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author heyunlin
 * @version 1.0
 */
@Service
public class AreaServiceImpl implements AreaService {

	private final AreaMapper areaMapper;

	@Autowired
	public AreaServiceImpl(AreaMapper areaMapper) {
		this.areaMapper = areaMapper;
	}

	@Override
	public List<Area> selectAll() {
		return areaMapper.selectList(null);
	}

	@Override
	public Area selectById(Integer id) {
		return areaMapper.selectById(id);
	}

}